import axios from 'axios'
import actionTypes from './actionTypes'
const getDetailDataAction = (data) => ({
    type: actionTypes.GET_DETAIL_DATA,
    articleTitle: fromJS(data.articleTitle),
    articleContent: fromJS(data.articleContent)
})
export const getDetailData = () => {
    return (dispatch) => {
        axios.get('/api/detail.json').then((res) => {
            dispatch(getDetailDataAction(res.data.data))
        })
    }
}